import http from "@/utils/http";
import { AxiosRequestConfig } from "axios";

export interface GetRecentView_ {
  /**
   * @description 中文名称
   */
  cnName?: string;
  /**
   * @description 页数
   * @format int32
   */
  pageNum?: number;
  /**
   * @description 条数
   * @format int32
   */
  pageSize?: number;
}

export class RecentView {
  /**
   * 查询用户个人最近浏览
   *
   * @tags 个人最近浏览指标controller
   * @request GET: /recent-view
   * @secure
   */
  getRecentView = (
    query: { cnName?: string; pageNum?: number; pageSize?: number } | GetRecentView_,
    params: AxiosRequestConfig = {},
  ) =>
    http.request<defs.ResponseEntityPageInfoRecentViewMetricsVO>({
      url: `/recent-view`,
      method: "GET",
      params: query,
      ...params,
    });
}

export default new RecentView();
